jQuery(window).load(function() {
  jQuery('.loading').fadeOut();
  jQuery('#header .logo').animate({marginTop : '0px'},{
        duration: 'slow', 
        easing: 'swing' 
        }
    );
});
/*
$(window).scroll(function () {
                    var height = $('body').height();
                    var scrollTop = $(window).scrollTop();

                      if(scrollTop>100){
                          $('#secondary').css({ 'position': 'fixed', 'top' : '0' , 'right':'0' });
                    }
                      else{
                         $('#secondary').css({ 'position': 'relative', 'top': '100px'});
                       }
                });
*/
$(document).ready(function(){
/*
var s = $("nav#access");
    var pos = s.position();                   
    $(window).scroll(function() {
        var windowpos = $(window).scrollTop();
       
        if (windowpos >= pos.top) {
            s.addClass("stick");
        } else {
            s.removeClass("stick");
        }
    }); */

	$(".menuBtn").click(function(){
	    $("#main, .topHeader ,nav.access, footer#colophon").addClass("menuVisible");
	    $('#main, #colophon').addClass("opacity");

	});
	$('.access').hover(function(){
		$('#main,  .topHeader, nav.access, footer#colophon').addClass('menuVisible');			
	},function(){
		$('#main, .topHeader, nav.access, footer#colophon').removeClass('menuVisible');		
	});


	$('.network-listing .eachProf:nth-child(3n + 3)').addClass('lastItem');


	$(".login-btn").click(function(){
		$('.bg').fadeIn();
		$('.login-pop').addClass('slidedown');
	});
	$(".close").click(function(){
		$('.bg').fadeOut();
		$('.login-pop').removeClass('slidedown');
	});

	$(".logoSlider").bxSlider({
		auto: true,
		pager: false,
		autoHover: true,
		minSlides:5,
		maxSlides: 5,
                moveSlides: 1,
		controls: false,
		slideWidth: 500,
		slideMargin: 30,
                infiniteLoop:true,
		pause: 3000
	});

	$(".newsSlider").bxSlider({
		auto: true,
		pager: false,
		mode:'fade',
		autoHover: true,
		controls: false,
		pause: 2000
	});
});

$(document).ready(function(){

 $(window).scroll(function() {    
   scrollBanner();
 });

});

// Parallex Banner
function scrollBanner() {
    scrollPos = $(this).scrollTop();
    
    $('.OurNetworks').css({
      'background-position' : 'center ' + (-scrollPos/2)+"px"
    });    
  }







  